Skip to content

MCDC part 10: miscellanea - #12340

Open
danielinux wants to merge 8 commits into
wolfSSL:masterfrom
danielinux:mcdc-10-misc
Open

danielinux wants to merge 8 commits into
wolfSSL:masterfrom
danielinux:mcdc-10-misc

Conversation

@danielinux

Copy link
Copy Markdown
Member

No description provided.

Copilot AI balanced review requested due to automatic review settings December 1, 2026 18:31
@danielinux danielinux self-assigned this Dec 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

New regression assertions in both whitebox tests are recorded as skips rather than failures, allowing the smoke tests to pass despite incorrect behavior.

2 open issues
What changed in this PR

Extends wolfCrypt’s modified condition/decision coverage (MC/DC) tests with boundary cases and internal-state checks. The PR changes tests only, not library implementations.

Changes:

  • Add arithmetic and cryptographic API boundary-case tests.
  • Expand white-box coverage for callbacks, memory ownership, error queues, and cleanup paths.
  • Propagate new cleanup-abort and ECCSI check failures through exit status.
File Description
wolfcrypt/​test/​test.c Tests 64-bit wrapper overflow/underflow and all-zero DH prime padding.
tests/​unit-mcdc/​test_wc_port_whitebox.c Checks cleanup-abort state transitions and reports failures.
tests/​unit-mcdc/​test_sakke_whitebox.c Tests invalid arguments before key initialization.
tests/​unit-mcdc/​test_memory_whitebox.c Checks heap-hint ownership and reference-count drops.
tests/​unit-mcdc/​test_logging_whitebox.c Tests thread-local error-queue marks and saturation.
tests/​unit-mcdc/​test_logging_globalq_whitebox.c Tests global error-queue marking and popping.
tests/​unit-mcdc/​test_eccsi_fault_whitebox.c Tests SSK order validation with an injected read failure.
tests/​unit-mcdc/​test_cryptocb_whitebox.c Expands device-detection, coordinate-validation, and callback dispatch coverage.
tests/​api/​test_hmac.c Tests missing device-backed HMAC keys identified by label.
tests/​api/​test_ed448.c Tests a non-NULL identifier with zero length.
tests/​api/​test_dsa.c Tests empty and oversized signature-domain parameters.

Review effort: Balanced

Comment thread tests/unit-mcdc/test_sakke_whitebox.c Resolved
@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

MemBrowse Memory Report · Explore what changed →

gcc-arm-cortex-m0plus

  • FLASH: .text -144 B (-0.2%, 72,672 B / 262,144 B, total: 28% used)

gcc-arm-cortex-m3

  • FLASH: .text +724 B (+0.5%, 135,242 B / 262,144 B, total: 52% used)

gcc-arm-cortex-m4

  • FLASH: .rodata.CSWTCH.2 +8 B, .rodata.str1.1 +99 B, .text +640 B (+0.3%, 214,232 B / 262,144 B, total: 82% used)

gcc-arm-cortex-m4-baremetal

  • FLASH: .text -128 B (-0.2%, 75,444 B / 262,144 B, total: 29% used)

gcc-arm-cortex-m4-crypto-only

  • FLASH: .rodata.CSWTCH.2 +8 B, .rodata.str1.1 +99 B (+0.1%, 185,019 B / 262,144 B, total: 71% used)

gcc-arm-cortex-m4-dtls13

  • FLASH: .text +896 B (+0.4%, 201,572 B / 1,048,576 B, total: 19% used)

gcc-arm-cortex-m4-min-ecc

  • FLASH: .text -128 B (-0.2%, 69,910 B / 262,144 B, total: 27% used)

gcc-arm-cortex-m4-openssl-compat

  • FLASH: .rodata +160 B, .text +1,664 B (+0.2%, 807,400 B / 1,048,576 B, total: 77% used)
  • RAM: .data +4 B (+0.0%, 121,764 B / 262,144 B, total: 46% used)

gcc-arm-cortex-m4-pkcs7

  • FLASH: .rodata.CSWTCH.2 +8 B, .rodata.str1.1 +99 B, .text -256 B (-0.1%, 227,324 B / 262,144 B, total: 87% used)

gcc-arm-cortex-m4-pq

  • FLASH: .rodata +112 B, .text +512 B (+0.2%, 320,224 B / 1,048,576 B, total: 31% used)

gcc-arm-cortex-m4-rsa-only

  • FLASH: .rodata +112 B, .text +896 B (+0.3%, 349,976 B / 1,048,576 B, total: 33% used)

gcc-arm-cortex-m4-sp-math

  • FLASH: .text -128 B (-0.2%, 69,910 B / 262,144 B, total: 27% used)

gcc-arm-cortex-m4-tls12

  • FLASH: .text +768 B (+0.6%, 136,014 B / 262,144 B, total: 52% used)

gcc-arm-cortex-m4-tls13

  • FLASH: .rodata.CSWTCH.2 +8 B, .rodata.str1.1 +99 B, .text +704 B (+0.3%, 256,690 B / 262,144 B, total: 98% used)

gcc-arm-cortex-m7

  • FLASH: .rodata.CSWTCH.2 +8 B, .rodata.str1.1 +99 B, .text +640 B (+0.3%, 214,232 B / 262,144 B, total: 82% used)

gcc-arm-cortex-m7-pq

  • FLASH: .rodata +112 B, .text +448 B (+0.2%, 321,056 B / 1,048,576 B, total: 31% used)

gcc-arm-cortex-m7-tls13

  • FLASH: .rodata.CSWTCH.2 +8 B, .rodata.str1.1 +99 B, .text +640 B (+0.3%, 256,690 B / 262,144 B, total: 98% used)

stm32-sim-stm32h753

  • FLASH: .text +11,212 B (+5.3%, 221,368 B / 2,097,152 B, total: 11% used)

zephyr-frdm_rw612

  • FLASH: rodata +32 B, text +280 B (+0.1%, 297,172 B / 67,108,864 B, total: 0% used)

Catch memory regressions in CI with MemBrowse. Free for open source.

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #12340

Scan targets checked: wolfcrypt-bugs, wolfssl-bugs
Coverage: 11 of 11 in-scope changed file(s) opened by the reviewer

Findings: 2
2 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Reported findings require changes before merge.

Review tier: Max

Comment thread tests/unit-mcdc/test_memory_whitebox.c Resolved
Release the initialized ECC keys so heap math frees the digits allocated by the negative-coordinate checks.

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #12340

Scan targets checked: wolfssl-bugs
Unchanged since last review (not re-run): wolfcrypt-bugs
Coverage: 1 of 1 in-scope changed file(s) opened by the reviewer

Fenrir result: Approved ✅

No new issues found in the changed files.

Advisory only — this automated result does not count as a GitHub approval.

Review tier: Lite

@wolfSSL-Fenrir-bot
wolfSSL-Fenrir-bot dismissed their stale review December 4, 2026 08:54

Fenrir's latest completed scan found no issues; clearing the prior automated change request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants